home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-07-24 | 716 b | 43 lines | [TEXT/MPS ] |
-
- PROGRAM TestApp;
-
- USES
- Types, Resources, Memory, OSUtils;
-
- CONST
- N = 5;
- kAccumulate = 0; {These are the control messages.}
- kFirstTime = 1;
- kLastTime = 2;
-
- VAR
- i : Integer;
- acc : Longint;
- h1, otherA5: Handle;
-
-
- FUNCTION CallModule (parm: Longint; message: Integer; VAR otherA5: Handle;
- modHandle: Handle) : Longint;
- INLINE $205F,
- $2050,
- $4E90;
-
-
- BEGIN
- h1 := GetResource('CUST',129);
- MoveHHi(h1);
- HLock(h1);
-
- FOR i := 1 TO N DO
- BEGIN
- CASE i OF
- 1: acc := CallModule(i,kFirstTime,otherA5,h1);
- N: acc := CallModule(i,kLastTime,otherA5,h1);
- OTHERWISE
- acc := CallModule(i,kAccumulate,otherA5,h1);
- END;
- WriteLn('SumSquares after ',i,' = ',acc);
- END;
- HUnlock(h1);
- END.
-